package com.neuedu.collection.set;

public class User  implements  Comparable<User>{
    @Override
    public int compareTo(User o) {
        return this.name.compareTo(o.name);
    }

    private  String name;
    private String  password;

    public String getName() {
        return name;
    }
    public User() {

    }
    public User(String name, String password) {
        this.name = name;
        this.password = password;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
